Skip to content

[PLT-1107] Add validation for empty row_data for Dataset create_data_rows #1667

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 11, 2024

Conversation

vbrodsky
Copy link
Contributor

@vbrodsky vbrodsky commented Jun 10, 2024

Description

During my implementation / refactor of Dataset create_data_rows, I somehow dropped validation of empty row_data. This PR restores validation of row_data and throws and error if it is None or an empty string

Fixes the issue discussed here https://labelbox.slack.com/archives/CPVQE6T2T/p1718010997829539

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Document change (fix typo or modifying any markdown files, code comments or anything in the examples folder only)

All Submissions

  • Have you followed the guidelines in our Contributing document?
  • [x ] Have you provided a description?
  • Are your changes properly formatted?

Changes to Core Features

  • Have you written new tests for your core changes, as applicable?
  • Have you successfully run tests with your changes locally?
  • Have you updated any code comments, as applicable?

@vbrodsky vbrodsky requested a review from a team as a code owner June 10, 2024 23:13
@vbrodsky vbrodsky force-pushed the VB/fix_row_data_validation branch from 22b9a3a to ee84e44 Compare June 10, 2024 23:46
@vbrodsky vbrodsky force-pushed the VB/fix_row_data_validation branch from ee84e44 to bf3b7c8 Compare June 11, 2024 16:08
if len(string_items) > 0:
dict_string_items = self._build_from_local_paths(string_items)
specs = DataRowUpsertItem.build(self.uid,
specs = DataRowCreateItem.build(self.uid,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought the point was to maximize use of upsert ... was this on purpose or just for this use case?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes we are using upsert, and this change just captures difference in data formatting and validation between create and upsert on the sdk side due to a number of edge cases for create

@vbrodsky
Copy link
Contributor Author

Lots of flaky tests, passing locally. Merging PR, will look to address the tests separately

@vbrodsky vbrodsky merged commit e23c301 into develop Jun 11, 2024
19 of 22 checks passed
@vbrodsky vbrodsky deleted the VB/fix_row_data_validation branch June 11, 2024 21:51
vbrodsky pushed a commit that referenced this pull request Jun 11, 2024
…te_data_rows (#1667)"

This reverts commit e23c301, reversing
changes made to 7538302.
vbrodsky added a commit that referenced this pull request Jun 12, 2024
vbrodsky pushed a commit that referenced this pull request Jun 13, 2024
vbrodsky pushed a commit that referenced this pull request Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants